{template header}
<!--{if empty($infloat)}-->
<div id="nav"><a href="$indexname">$bbname</a> $navigation</div>
<div id="wrap" class="wrap s_clear">
	<div class="main"><div class="content nofloat">
<!--{/if}-->

<div class="fcontent">
	<h3 class="float_ctrl">
		<em id="return_$handlekey">{lang pay_attachment}</em>
		<span>
			<!--{if !empty($infloat)}--><a href="javascript:;" class="float_close" onclick="hideWindow('$handlekey')" title="{lang close}">{lang close}</a><!--{/if}-->
		</span>
	</h3>
	<form id="attachpayform" method="post" action="misc.php?action=attachpay{if !empty($infloat)}&paysubmit=yes&infloat=yes" onsubmit="ajaxpost('attachpayform', 'return_$handlekey', 'return_$handlekey', 'onerror');return false;"{else}"{/if}>
	<input type="hidden" name="formhash" value="{FORMHASH}" />
	<input type="hidden" name="referer" value="$referer" />
	<input type="hidden" name="aid" value="$aid" />
	<!--{if !empty($infloat)}--><input type="hidden" name="handlekey" value="$handlekey" /><!--{/if}-->
	<table class="list" cellspacing="0" cellpadding="0" style="width:300px">
		<tr>
			<td>{lang author}</td>
			<td><a href="space.php?uid=$attach[uid]">$attach[author]</a></td>
		</tr>
		<tr>
			<td>{lang attachment}</td>
			<td><div style="overflow:hidden">$attach[filename] <!--{if $attach['description']}-->($attach[description])<!--{/if}--></div></td>
		</tr>
		<tr>
			<td>{lang price}({$extcredits[$creditstransextra[1]][title]})</td>
			<td>$attach[price] {$extcredits[$creditstransextra[1]][unit]}</td>
		</tr>
		<tr>
			<td>{lang pay_author_income}({$extcredits[$creditstransextra[1]][title]})</td>
			<td>$attach[netprice] {$extcredits[$creditstransextra[1]][unit]}</td>
		</tr>
		<tr>
			<td>{lang pay_balance}({$extcredits[$creditstransextra[1]][title]})</td>
			<td>$balance {$extcredits[$creditstransextra[1]][unit]}</td>
		</tr>
		<tr class="btns" align="center">
			<td colspan="2">
				<a class="right" href="attachment.php?aid=$aidencode">{lang download}</a>
				<button class="submit" type="submit" name="paysubmit" value="true">{lang submit}</button>
			</td>
		</tr>
	</table>
	</form>
</div>

<!--{if !empty($infloat)}-->
<script type="text/javascript" reload="1">
function submithandle_$handlekey(locationhref) {
	ajaxget('viewthread.php?tid=$attach[tid]&viewpid=$attach[pid]', 'post_$attach[pid]');
	hideWindow('$handlekey');
	showCreditPrompt();
}
</script>
<!--{/if}-->

<!--{if empty($infloat)}-->
	</div></div>
</div>
<!--{/if}-->
{template footer}